home *** CD-ROM | disk | FTP | other *** search
- Path: news.polymtl.ca!cormier
- From: cormier@step.polymtl.ca (Mario Cormier)
- Newsgroups: comp.lang.c
- Subject: Re: HELP WITH C PROGRAMMING!!!
- Date: 20 Jan 1996 03:40:46 GMT
- Organization: STEP
- Message-ID: <4dpo7u$aho@service.polymtl.ca>
- References: <kelvin-1901961812070001@user12.infohouse.com>
- NNTP-Posting-Host: step.polymtl.ca
- X-Newsreader: TIN [version 1.2 PL2]
-
- Kelvin Eng (kelvin@infohouse.com) wrote:
- : I have a few C-Programming Questions that need to be answer, if you can
- : answer or or even one, it would be of great help and would be greatly
- : appreciated.
-
- : 1) Write a program which prompts the user for integer values for a, b, c,
- : and d and outputs a table of values of the following polynomial: an3 + bn2
- : + cn + d = f(n) for values of n from O to 10.
-
- : Number 2 is referring to the program C-Robots
-
- : 2) Write a robot which immediately travels to the center coordinates of
- : the screen, stays there and fires continuously in a clockwise pattern
- : exactly 30 shots per each rotation.
-
- : 3) Write a function which accepts three arguments and evaluates the
- : discriminant of a
- : quadratic equation: b(squared)-4ac. The function returns 1 if the
- : discriminant is greater than zero, -1 if less than zero and zero
- : otherwise.
-
- : 4) Write a function which accepts 2 integer arguments and returns the sum
- : of the squares of all the integers between those arguments (and including
- : them.)
-
- : 5) Use a calculator, to write the output for this fragment:
-
- : main()
-
- : {
- : float x = 79.1;
-
- : num= 1.0;
-
- : while(abs_val(num*num - x) > = .0000001)
-
- : {
- : num = (x/num + num) / 2;
- : printf(" %f\n",num);
- : }
- : }
-
- : 6) Write a function which prints out a list of Pythagorean triples in
- : which the legs differ by 1.
- : The function checks whether x(squared) + (x+ 1)(squared) is a perfect
- : square as x increases from 3 to the limit of the computer:
-
- : 3 4 5
-
- : 20 21 29
-
- : etc.
-
- : 7) Write a program containing a function called "convert" which accepts a
- : single float
- : argument (░F) and returns its centigrade equivalent (nearest hundredth), using:
- : C░ = 5 (F░-32) / 9
- : The program must prompt the user to enter a temperature.
-
- Sorry, I am not into doing homework for other people. I have enough work
- with mine already...
-
- : Thanks in any help HELP
- : Please email me at: kelvin@infohouse.com with any answers.
- : I really appreciate it.
-
- --
- ============================================================================
- == OS/2 Development == Mario Cormier ==
- == #### #### ## #### == Computer Engineering ==
- == ## ## ## ## ## ## == Ecole Polytechnique de Montreal ==
- == ## ## #### ## ## == ==
- == ## ## ## ## ## == cormier@info.polymtl.ca ==
- == #### #### ## ###### == cormier@step.polymtl.ca ==
- ============================================================================
-